#include <stdio.h>
#include <string.h>
int main ()
{
	int arr[8] = {25, 36, 47, 58, 69, 76, 89, 101};
	int arr2[9];
	int n = 87;
	int j = 0;
	printf("The array before inserting is \n");
	for (int i = 0; i <= 7; i++)
	{
		printf("%d ", arr[i]);
	}
	//start inserting
	while (j <= 7)
	{
		if (arr[j] <= n)
		{
			arr2[j] = arr[j];
		}
		else
		{
			break;
		}
		j++;
	}
	arr2[j] = n;
	while (j <= 7)
	{
		arr2[j+1] = arr[j];
		j++;
	}
	//print
	printf("\n The array after intertingis \n");
	for (int i = 0; i <= 8; i++)
	{
		printf("%d ", arr2[i]);
	}

}

